const Roter=require('koa-router');

const { getPerms,getPermRoles,addpermRoles,getopsByPermID,updateOpByID,delOprationByID} =require('../controller/perm.controller')
const {authToken } = require('../middleware/user.middleware')

const permRouter = new Roter({
  prefix: '/perm'
});

permRouter.get('/', authToken,getPerms)
permRouter.get('/permroles', authToken,getPermRoles)
permRouter.post('/addPermRoles', authToken,addpermRoles)

permRouter.post('/getopsByPermID', authToken,getopsByPermID)
permRouter.post('/updateOpByID', authToken,updateOpByID)
permRouter.post('/delOprationByID', authToken,delOprationByID)

module.exports = permRouter;